from data.get_data import GetData


class InterfaceData(object):
    def __init__(self, file_name):
        self.file_name = file_name

    def case_count(self, sheet_name):
        """
        :param sheet_name:
        :return: 遍历sheet中的行号，返回一个行号数组
        """
        case_count = [num for num in range(1, GetData(self.file_name, sheet_name).get_case_lines())]
        return case_count

    def data_case(self, sheet_name):
        # 调用操作excle文件的封装方法
        data_case = GetData(self.file_name, sheet_name)
        return data_case

if __name__ == '__main__':
    a = InterfaceData("自助兑币机.xls")
    b = a.data_case('GetPhysicalCoinGoodsList')
    c = b.get_case_lines()
    d = a.case_count('GetPhysicalCoinGoodsList')
    print(b)


